<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>
<body>
    <template id="listTemplate">
        <div>
            <div style="clear: both;">
                <lessionitem></lessionitem>
                <lessionitem></lessionitem>
                <lessionitem></lessionitem>
                <lessionitem></lessionitem>
            </div>
        </div>
    </template>
    <template id="itemTemplate">
        <div style="float: left;">
            <div><img src="../images/model14.jpg" style="width: 240px;height: 144px;"></div>
            <div><span style="font-weight: bold;">{{lessionName}}</span></div>
            <div>{{lessionDesc}}</div>
        </div>
    </template>
    <div id="app">
        <lessionlist></lessionlist>
    </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        components:{
            'lessionlist':{
                template:'#listTemplate',
                components:{
                    'lessionitem':{
                        template:'#itemTemplate',
                        data:function(){
                            return{
                                lessionName:'Java学习专题',
                                lessionDesc:'Java是当今世界上最主流的编程语言'  
                            }
                        }
                    }
                }
            }
        }
    });
</script>